/**
 * @class Ext.ux.FilterManager
 */
Ext.ux.FilterManager = function() {
	return {
		/**
		 * @property types
		 * @type Object
		 * The stored filter types
		 */
		types	: {},

		/**
		 * Registers a FilterType by name
		 * @param {String} name The string name of the filter type to register
		 * @param {Function} filter A reference to the filter's constructor
		 */
		reg		: function(name, filter) {
			this.types[name] = filter;
		},

		/**
		 * Finds a given filter by registered name
		 * @param {String} name The name of the ftype
		 * @return {Ext.ux.Filter|null} The filter's constructor, or null
		 */
		find	: function(name) {
			return this.types[name];
		},

		/**
		 * Constructs a filter based on ftype and a config object
		 * @param {String} name The name of the ftype to construct a filter instance of
		 * @return {Ext.ux.Filter} The newly constructed filter
		 */
		build	: function(name, config) {
			var con = this.find(name);

			if (typeof con != 'undefined')
				return new con(config);
		}
	};
}();
